home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / scripts / jobclient.awk < prev    next >
Text File  |  1996-10-29  |  481b  |  30 lines

  1. BEGIN {
  2.     file=ENVIRON["HOME"] "/Mail/jobs"
  3.     IGNORECASE=1
  4.  
  5.     while ((getline < file) > 0)
  6.     {
  7.     if (match($0,/^#/) || $1=="")
  8.         continue;
  9.  
  10.     if (!match ($0,/[a-zA-Z_]+[0-9]+ (FREE|WORK|DONE)/))
  11.         continue;
  12.  
  13.     id=$1; status=$2;
  14.     getline < file;
  15.     email=$1;
  16.     getline text < file;
  17.  
  18.     for (t=0; t<ARGC; t++)
  19.     {
  20.         if (match (id,ARGV[t]) || match (text,ARGV[t]))
  21.         {
  22.         gsub(text,"\n","\n# ");
  23.         print "# " text;
  24.         print "req " id "\ndone " id;
  25.         break;
  26.         }
  27.     }
  28.     }
  29. }
  30.